{% extends 'base.html' %}
{% from 'bootstrap4/form.html' import render_form %}

{% block head %}

<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/login.css') }}">

{% endblock %}
 
{% block title %}Python博客 - 登录{% endblock %} 
 
{% block page_content %} 
<!--
<div class="page-header"> 
    <h1>Login</h1> 
</div>--> 
<!--
<div class="col-md-4"> 
    {{ render_form(form) }} 
</div> -->
<!--
<div class="container">
    <div class="row">
      <div class="col-sm-9 col-md-7 col-lg-5 mx-auto">
        <div class="card border-0 shadow rounded-3 my-5">
          <div class="card-body p-4 p-sm-5">
            <h5 class="card-title text-center mb-5 fw-light fs-5">Sign In</h5>
            <form method="POST">
                {{ form.csrf_token }}
              <div class="form-floating mb-3">
                <input type="email" class="form-control" name='email' id="floatingInput" placeholder="name@example.com">
                <label for="floatingInput">Email地址</label>
              </div>
              <div class="form-floating mb-3">
                <input type="password" class="form-control" name='password' id="floatingPassword" placeholder="Password">
                <label for="floatingPassword">密码</label>
              </div>

              <div class="form-check mb-3">
                <input class="form-check-input" name='remember_me' type="checkbox" value="" id="rememberPasswordCheck">
                <label class="form-check-label" for="rememberPasswordCheck">
                  记住我
                </label>
              </div>
              <div class="d-grid">
                <button class="btn btn-primary btn-login text-uppercase fw-bold" name='submit' type="submit">登录</button>
              </div>
              <hr class="my-4">
              
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>-->
  <div class="container px-4 py-5 mx-auto">
    <div class="card card0">
        <div class="d-flex flex-lg-row flex-column-reverse">
            <div class="card card1">
                <div class="row justify-content-center my-auto">
                    <div class="col-md-8 col-10 my-5">
                        <div class="row justify-content-center px-3 mb-3"> <img id="logo" src="https://i.imgur.com/PSXxjNY.png"> </div>
                        <h3 class="mb-5 text-center heading">We are Flasky</h3>
                        <div class="page-header"> 
                          <h1>Login</h1> 
                      </div>
                        <form method="POST">
                        {{ form.csrf_token }}  
                        <!--<div class="form-group"> <label class="form-control-label text-muted">Email地址</label> <input type="email" id="email" name="email" placeholder="Email地址" class="form-control"> </div>
                        <div class="form-group"> <label class="form-control-label text-muted">Username</label> <input type="text" id="email" name="Username" placeholder="Username" class="form-control"> </div>-->
                       <!-- <div class="form-group"> <label class="form-control-label text-muted">Password</label> <input type="password" id="psw" name="password" placeholder="Password" class="form-control"> </div>
                        <div class="form-group"> <label class="form-control-label text-muted">verify_code </label> <input type="verify_code" id="verify_code" name="验证码" placeholder="verify_code" class="form-control"> </div>  -->
                          {{ render_form(form) }} 
                        <img class="verify_code" src="/auth/code " onclick="this.src='/auth/code?'+ Math.random()">
                        <!-- <div class="form-check mb-3">
                          <input class="form-check-input" name='remember_me' type="checkbox" value="" id="rememberPasswordCheck">
                          <label class="form-check-label" for="rememberPasswordCheck">
                            记住我
                          </label>
                        </div> -->
                         
                        <!-- <div class="row justify-content-center my-3 px-3">
                           <button class="btn-block btn-color" name='submit' type="submit">
                             Login to Flasky
                            </button>
                        </div>  -->
                        </form>
                          <p>
                            新用户?
                             <a href="{{ url_for('auth.register') }}">
                               点击这里去注册
                             </a>
                           </p>
                    </div>
                </div>
                 
            </div>
            <div class="card card2">
                <div class="my-auto mx-md-5 px-md-5 right">
                    <h3 class="text-white">We are more than just a company</h3> <small class="text-white">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</small>
                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}